<%= form_for @event ||= FullcalendarEngine::Event.new, :html => { id: 'event_form' } do |f| %>
<p>
  <%=f.label :title %>
  <br/>
  <%=f.text_field :title %>
</p>
<p>
  <%=f.label :description %>
  <br/>
  <%=f.text_area :description, :rows => 4, :cols => 30 %>
</p>
<p>
  <%=f.label :starttime, 'Start Time' %>
  <br/>
  <%=f.datetime_select :starttime %>
</p>
<p>
  <%=f.label :endtime, 'End Time' %>
  <br/>
  <%=f.datetime_select :endtime %>
</p>
<p>
  <%=f.label :all_day %>
  <%=f.check_box :all_day %>
</p>
<p>
  <%=f.label :period, "Repeats" %>
  <%=f.select :period, FullcalendarEngine::Event::REPEATS.values, {}, onchange: "FullcalendarEngine.Events.showPeriodAndFrequency(this.value);" %>
</p>
<p id = "frequency" style = "display:none;">
  <%=f.label :frequency, "Repeat every" %>
  <%=f.select :frequency, (1..30).to_a %> <span id = "period"></span>
</p>
<p>
  <%=f.submit %> <span id = "creating_events" class="spinner" style = "display:none;">Creating, Please wait...</span>
</p>
<%end %>